package com.example.administrator.xiaoxiang.activity;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.View;
import android.widget.ListView;
import android.widget.TextView;

import com.example.administrator.xiaoxiang.R;

public class IndentActivity extends AppCompatActivity {

    private String title[] = {"订单", "待付款", "待收货"};
    private TextView tv;
    private View emptyView;
    private ListView listview;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_indent);
        init();
    }

    private void init() {
        listview = (ListView) findViewById(R.id.listView);
        tv = (TextView) findViewById(R.id.indent_text);
        emptyView = findViewById(R.id.emptyview);

        listview.setEmptyView(emptyView);
        Intent intent = getIntent();
        String iddata = intent.getStringExtra("id");

        Log.d("1620", "" + iddata);
        if (iddata.equals("ic1")) {
            tv.setText(title[0]);
            tv.setTextSize(20);
        }
        if (iddata.equals("ic2")) {
            tv.setText(title[1]);
            tv.setTextSize(20);
        } else {
            tv.setText(title[2]);
            tv.setTextSize(20);
        }

    }

    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.black_img_btn:
                finish();

                break;
        }
    }

}
